package com.neusoft.control;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.neusoft.bean.AdminInfoBean;
import com.neusoft.bean.AdminInfoBeanQuery;
import com.neusoft.myutils.MyUtil;
import com.neusoft.service.AdminInfoService;

@WebServlet("/QueryAdminInfoServlet")
public class QueryAdminInfoServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;

	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		//获取查询表单数据
		AdminInfoBeanQuery adminBQ = MyUtil.convertRequestParameters2Bean(request, AdminInfoBeanQuery.class);
		List<AdminInfoBean> aiblst = MyUtil.getInstance(AdminInfoService.class).getAdminInfo(adminBQ);
		request.getSession().setAttribute("aiblst", aiblst);
		//request.getRequestDispatcher("queryAdmin/queryAdmin.jsp").forward(request, response);
		response.sendRedirect("queryAdmin/queryAdmin.jsp");
	}

}
